package com.scsj.supermarket.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.scsj.supermarket.R;
import com.scsj.supermarket.bean.MessageListBean;

import java.util.List;

/**
 * 消息列表
 */
public class MessageListAdapter extends BaseQuickAdapter<MessageListBean,BaseViewHolder>{
    public MessageListAdapter( List data) {
        super(R.layout.item_messagelist, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MessageListBean item) {
        helper.setImageResource(R.id.img,item.getImg());
        helper.setText(R.id.name_tv,item.getName());
        helper.setText(R.id.date_tv,item.getDate());
        helper.setText(R.id.intro_tv,item.getIntro());
        helper.setText(R.id.detail_tv,item.getDatails());
    }
}
